package com.otitan.la.forest.industry.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.handler.inter.IExcelDataModel;
import cn.afterturn.easypoi.handler.inter.IExcelModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: java类作用描述
 * @Author: jiachangsen
 * @CreateDate: 2020/10/14 16:36
 * @UpdateUser: jiachangsen
 * @UpdateDate: 2020/10/14 16:36
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CatInputEntity implements IExcelDataModel, IExcelModel {



    /**
     * 行号
     */
    private int rowNum;

    /**
     * 错误消息
     */
    private String errorMsg;


    private String id;

    @Excel(name = "姓名")
    @NotBlank(message = "[姓名]不能为空")
    private String name;

    @Excel(name = "性别", replace = { "男_1", "女_0" })
    @Pattern(regexp = "[01]", message = "性别信息错误")
    private String sex;

    @Excel(name = "年龄")
    private Integer age;

    @Excel(name = "存款")
    private BigDecimal money;

    @Excel(name = "生日", format="yyyy-MM-dd")
    private Date birthday;

    private String remark;

}
